import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:fixnum/fixnum.dart' as $fixnum;

class RoomConfig {
  static List<String> roomPushEventList = [
    // "UserJoin",
    "UserLeave",
    "SendGift",
    "ManagerOperation",
    "ChannelShare",
    "MicChange",
    "RoomMetaDataChange",
    "RealTimeRankChange",
    "GiftValueChange",
    "MicQueueChange",
    "VipParkChange",
    "RoleChange",
    "ProgramChange",
  ];

  // COMMON(id = 0, desc = "聊天交友"),
  // GAME(id = 1, desc = "游戏开黑"),
  // KTV(id = 2, desc = "KTV"),
  // GAME_2(id = 3, desc = "狼人杀", gameId = "1472142747708284929"),
  // DF(id = 4, desc = "兜风"),
  // GAME_3(id = 5, desc = "数字炸弹", gameId = "1468091457989509190"),
  // GAME_5(id = 7, desc = "大话骰", gameId = "1490944604005199873"),
  // GAME_6(id = 8, desc = "飞镖达人", gameId = "1461228379255603251"),
  // GAME_7(id = 9, desc = "五子棋", gameId = "1461297734886621238"),
  // GAME_8(id = 10, desc = "数字转轮", gameId = "1468434637562912769")

  // CHAT(id = 0, desc = "聊天交友"),
  // GAME(id = 1, desc = "游戏开黑"),
  // GAME_2(id = 3, desc = "狼人杀", gameId = 1472142747708284929L),
  // DF(id = 4, desc = "兜风"),
  // GAME_5(id = 7, desc = "大话骰", gameId = 1490944604005199873L),
  // GAME_6(id = 8, desc = "飞镖达人", gameId = 1461228379255603251L),
  // GAME_9(id = 11, desc = "飞行棋", gameId = 1468180338417074177L),
  // SING(id = 12, desc = "点唱"),

  static const int TEMPLATE_ID_CHAT = 0;
  static const int TEMPLATE_ID_GAME = 1;
  static const int TEMPLATE_ID_WOLF = 3;
  static const int TEMPLATE_ID_SAI = 7;
  static const int TEMPLATE_ID_FEIBIAO = 8;
  static const int TEMPLATE_ID_FLY = 11;
  static const int TEMPLATE_ID_DIANCHANG = 12;
  static const int TEMPLATE_ID_HALL = 13;

  // static List<Template> templateList=[
  //   Template("assets/images/ic_room_tool_chat.png", TemplateItem.create()..templateName="聊天交友"..templateId= 0),
  //   Template("assets/images/ic_room_game.png", TemplateItem.create()..templateName="游戏开黑"..templateId= 1),
  //   // Template("assets/images/ic_room_ktv.png", TemplateItem.create()..templateName="KTV"..templateId= 2),
  //   Template("assets/images/ic_room_wolf.png", TemplateItem.create()..templateName="狼人杀"..templateId= 3..gameId=$fixnum.Int64(1472142747708284929)),
  //   // Template("assets/images/ic_room_doufeng.png", TemplateItem.create()..templateName="兜风"..templateId= 4),
  //   // Template("assets/images/ic_room_boom.png", TemplateItem.create()..templateName="数字炸弹"..templateId= 5..gameId=$fixnum.Int64(1468091457989509190)),
  //   Template("assets/images/ic_room_sai.png", TemplateItem.create()..templateName="大话骰"..templateId= 7..gameId=$fixnum.Int64(1490944604005199873)),
  //   Template("assets/images/ic_room_feibiao.png", TemplateItem.create()..templateName="飞镖达人"..templateId= 8..gameId=$fixnum.Int64(1461228379255603251)),
  //   Template("assets/images/ic_room_fly.png", TemplateItem.create()..templateName="飞行棋"..templateId= 11..gameId=$fixnum.Int64(1468180338417074177)),
  //   Template("assets/images/ic_room_dianchang.png", TemplateItem.create()..templateName="点唱"..templateId= 12),
  // ];

  // static List<BackgroundItem> hallBackgroundList = [
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_chat_room_1.png'
  //     ..id = $fixnum.Int64(101),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_chat_room_2.jpg'
  //     ..id = $fixnum.Int64(102),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_chat_room_3.png'
  //     ..id = $fixnum.Int64(103),
  // ];

  // static List<BackgroundItem> doufengBackgroundList = [
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_doufeng_1.webp'
  //     ..id = $fixnum.Int64(201),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_doufeng_2.webp'
  //     ..id = $fixnum.Int64(202),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_doufeng_3.webp'
  //     ..id = $fixnum.Int64(203),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_doufeng_4.webp'
  //     ..id = $fixnum.Int64(204),
  //   BackgroundItem.create()
  //     ..url = 'assets/images/bg_doufeng_5.webp'
  //     ..id = $fixnum.Int64(205),
  // ];

  static Size micIconSize(UserIconStyle style) {
    switch (style) {
      case UserIconStyle.normal:
        return const Size(50.0, 50.0);
    }
  }
}

enum UserIconStyle { normal }

enum DisplayItemGiftStatus {
  wait,
  inAni,
  willAni,

  ///inAni ani 重叠显示状态避免过度时闪烁
  ani,
  outAni,
}

class PositionOffset {
  final Offset offset;
  final UserIconStyle style;
  final Size size;
  final bool inPosition;
  PositionOffset(this.offset,
      [this.style = UserIconStyle.normal,
      this.size = const Size(50.0, 50.0),
      this.inPosition = true]);
}

class DisplayGiftConfig {
  final GlobalKey? key;
  final int count;
  final int uid;
  final List<int>? uidList;
  final String giftUrl;
  final String iconUrl;
  final bool showAnimation;
  final int giftId;
  final List<String>? imgList;
  final List<String>? textList;

  DisplayGiftConfig(
    this.giftUrl,
    this.iconUrl, {
    this.key,
    this.uid = 0,
    this.uidList,
    this.count = 1,
    this.showAnimation = false,
    this.giftId = 0,
    this.imgList,
    this.textList,
  });
}
